package at.fhooe.stefanirndorfer.walls;

import at.fhooe.stefanirndorfer.materials.Material;

public class Wall {

	int width;
	int height;
	double posX;
	double posY;
	WallCollider wallCollider;
	Material material;
	String id;
	GeometryManager geometryManager;
	
	public Wall(double posX, double posY, int width, int height, Material material, GeometryManager geometryManager){
		this.width = width;
		this.height = height;
		this.posX = posX;
		this.posY = posY;
		wallCollider = new WallCollider(this);
		this.material = material;
		id = this.getClass().getSimpleName() + System.nanoTime();
		this.geometryManager = geometryManager;
		geometryManager.addWall(this);
	}
	
	
	public void destroy(){
		geometryManager.removeWall(this);
	}

	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public double getPosX() {
		return posX;
	}

	public void setPosX(double posX) {
		this.posX = posX;
	}

	public double getPosY() {
		return posY;
	}

	public void setPosY(double posY) {
		this.posY = posY;
	}

	public WallCollider getWallCollider() {
		return wallCollider;
	}

	public void setWallCollider(WallCollider wallCollider) {
		this.wallCollider = wallCollider;
	}

	public Material getMaterial() {
		return material;
	}

	public void setMaterial(Material material) {
		this.material = material;
	}

	public String getId() {
		return id;
	}
	
	
	
	
}
